<html>
  <head>
    <title>FCM Demo</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
  </head>
  <body>
    <h1>Valid <strong>WITH</strong> VAPID Key</h1>

    <script src="/firebase-app.js"></script>
    <script src="/firebase-messaging.js"></script>
    <script src="../app.js"></script>
    <script src="../constants.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/sinon.js/4.1.3/sinon.min.js"></script>
    <script>
      navigator.serviceWorker
        .register('./sw.js')
        .then(reg => {
          window.__test = new window.DemoApp(FIREBASE_CONFIG, {
            swReg: reg,
            vapidKey: PUBLIC_VAPID_KEY
          });
        })
        .catch(error => {
          console.log('Error registering FCM SW: ' + error);
        });
    </script>
  </body>
</html>
